package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xmy.cultivate.entity.Quarter;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.RenewClass;
import com.xmy.cultivate.exception.CommonException;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 每年季度 服务类
 * </p>
 *
 * @author min
 * @since 2022-08-22
 */
public interface IQuarterService extends IService<Quarter> {

    public abstract List<Map<String,Object>> getYearPartList();

    public abstract IPage<Map<String,Object>> findAll(IPage<?> page, Wrapper wrapper);

    public abstract boolean saveTo(Quarter quarter);

    public abstract Integer getQuarterYearPartForNum(Integer newNum);

    public abstract RenewClass getRenewForPay(Long schoolId,Long studentId,Long subjectId,Integer quarterNum) throws ParseException;

    public abstract RenewClass getRenewForTransfer(Long studentId, Long schoolId, Long subjectId, Long courseId, Integer houseNum);

    public abstract Quarter getNowQuarter();

    public abstract Quarter getQuarterForYearAndNum(Integer yearPart,Integer num);

    public abstract Quarter getLastQuarter(Integer yearPart,Integer quarterNum);
}
